﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 模板方法模式
{
    internal class TestPaper
    {
        public void TestQuestion1()
        {
            Console.WriteLine("试题1");
            Console.WriteLine("答案：{0}", this.Answer1());
        }

        public void TestQuestion2()
        {
            Console.WriteLine("试题2");
            Console.WriteLine("答案：{0}", this.Answer2());
        }

        public void TestQuestion3()
        {
            Console.WriteLine("试题3");
            Console.WriteLine("答案：{0}", this.Answer3());
        }

        protected virtual string Answer1()
        {
            return string.Empty;
        }

        protected virtual string Answer2()
        {
            return string.Empty;
        }

        protected virtual string Answer3()
        {
            return string.Empty;
        }
    }
}
